package com.lanchetech.dao;
import com.lanchetech.bean.request.PageReq;
import com.lanchetech.bean.vo.ColumnCourseCollectPageVO;
import org.apache.ibatis.annotations.Param;
import java.util.List;

import com.lanchetech.entity.ColumnCourseCollect;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface ColumnCourseCollectMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ColumnCourseCollect record);

    int insertSelective(ColumnCourseCollect record);

    ColumnCourseCollect selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ColumnCourseCollect record);

    int updateByPrimaryKey(ColumnCourseCollect record);

    ColumnCourseCollect findOneByCourseIdAndType(@Param("courseId")Long courseId,@Param("type")Byte type);

    ColumnCourseCollect findOneByUserIdAndCourseIdAndType(@Param("userId")Long userId,@Param("courseId")Long courseId,@Param("type")Byte type);

    ColumnCourseCollect findOneByUserIdAndColumnIdAndType(@Param("userId")Long userId,@Param("columnId")Long columnId,@Param("type")Byte type);

    List<ColumnCourseCollect> findAllByUserIdAndColumnIds(@Param("userId")Long userId,@Param("columnIds")List<Long> columnIds);

    List<ColumnCourseCollectPageVO> findAllPage(PageReq req);



}